package rus.aptu.boardOptimization.data;

import java.util.Arrays;

public class Board {

    private Point[] points;
    private int N;
    private int width;
    private int height;

    public Board(int n, int w, int h) {
        points = new Point[n];
        N = n;
        width = w;
        height = h;
    }

    public Board(Board board) {
        points = new Point[board.points.length];
        for (int i = 0; i < points.length; i++)
            points[i] = new Point(board.points[i].getX(), board.points[i].getY());
        this.width = board.width;
        this.height = board.height;
    }

    public int getPointsCount() {
        return points.length;
    }

    public int getWidth() {
        return width;
    }

    public int getHeight() {
        return height;
    }

    public Point getPoint(int index) {
        return points[index];
    }

    public void setPoint(int index, Point p) {
        points[index] = p;
    }

 /*   public Board operator = (Board ){
        for (int i = 0; i < b.)
    }
       */
    @Override
    public String toString() {
        return "rus.aptu.boardOptimization.data.Board{" +
                "points=" + (points == null ? null : Arrays.asList(points)) +
                '}';
    }
}